<template>
  <div>
    <div @click="back">
      <van-nav-bar left-text="返回" left-arrow title="评论" />
    </div>
    <div>
      <p>评论作者 头像 什么都没有就懒得写样式了</p>
    </div>
    <div v-for="item in listPl" :key="item.id" class="dicpl">
      
      <p>{{item.content}}</p>
      <p>{{item.createTime}}</p>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
import { Allp } from '@/service/taxonomic'
export default {
  computed: {
    ...mapState(['lvsID']),
  },
  data() {
    return {
      id: '',
      listPl: [],
    }
  },
  created() {
    const res0 = this.$store.state.lvsID
    this.id = res0
  },
  async mounted() {
    console.log('moub', this.id)
    const list = await Allp({
      newsId: this.id,
    })
    console.log('list', list)
    this.listPl = list.data.rows.splice(229, 12)
  },
  methods: {
    back() {
      this.$router.push('/CategOrized')
    },
  },
}
</script>

<style lang="scss" scoped>
.dicpl {
  font-size: 14px;
  margin: 10px 0;
  line-height: 20px;
}
</style>